package com.java并发编程.Fork_Join.RecursiveTask;

import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.ForkJoinTask;

public class RecursiveTaskTest {
	
	public static void main(String[] args) {
		ForkJoinPool pool = new ForkJoinPool();
		ForkJoinTask<Integer> taskA = pool.submit(new MyRecursiveTaskA());
		ForkJoinTask<Integer> taskB = pool.submit(new MyRecursiveTaskB());
		
		System.out.println(taskA.join() + "A");
		System.out.println(taskB.join() + "B");
	}

}
